package com.common.global;

import lombok.Data;

@Data
public class GlobalException extends RuntimeException {

    private String code;

    public GlobalException(GlobalBaseEnum globalBaseEnum) {
        super(globalBaseEnum.message());
        this.code = globalBaseEnum.code();
    }

    public GlobalException(String msg) {
        super(msg);
        this.code = GlobalDefaultEnum.DEFAULT_ERROR1.code();
    }
}
